///////////////////////////////////////////////////////////////////////////
//																		 //
//	Author:		Michael Mozdzierz										 //
//	Date:		10/22/2014												 //
//	Purpose:	this document holds all default commands, i.e. functions //
//				used by	the command console								 //
//																		 //
///////////////////////////////////////////////////////////////////////////

#ifndef _CONSOLE_COMMANDS_H
#define _CONSOLE_COMMANDS_H

#include "Console.h"
#include "..\EdgeGraphics\Camera.h"
#include "..\EdgeMath\VectorHelper.h"
#include <string>
#include <Windows.h>
#include "../EdgeRemote/NetworkManager.h"
#include "../EdgeRemote/IPAddress.h"

using namespace std;

// automatically quits the game
void __cdecl quit_game(void** prams)
{
	PostQuitMessage(0);
}

void __cdecl showCamPos(void** prams)
{
	Vector3 position = Camera::GetInstance()->getPosition();
	string x = to_string(position.x);
	string y = to_string(position.y);
	string z = to_string(position.z);

	Console::GetInstance()->WriteLine((x + "," + y + "," + z).c_str(), VectorHelper::vector_4::white);
}

void beginNetworkGame(void**)
{
	Console::GetInstance()->WriteLine("Connecting to server...\n", vector_4::green);
	NetworkManager::GetInstance()->ConnectToSession(IPAddress(72, 238, 57, 4));
}

#endif